package com.heima.wemedia.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.wemedia.service.WmChannelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Lijx
 * @Date 2024-07-21 19:19
 */
@RestController
@RequestMapping("/api/v1/channel")
@Slf4j
public class WmChannelController {
    @Autowired
    private WmChannelService wmChannelService;
    /**
     * 查询所有频道
     * @return
     */
    @GetMapping("/channels")
    public ResponseResult getChannels(){
        log.info("查询所有频道接口");
        return wmChannelService.getChannels();
    }
}
